1. Field of the Invention
The invention relates to a light driving device and, in particular, to a light driving device and a light driving method for alternately driving lights with a single signal.
2. Description of the Related Art
In various electronic devices, lights are often used to indicate different states thereof. Different light signals are required according to different applications of the electronic devices. As a result, light driving devices are required to control flashing, i.e. ON and OFF states, of the lights.
There are two methods generally used to drive lights. The first one, as shown in FIG. 1, is that control signals of light emitting diodes (LEDs) are provided by a general purpose input/output (GPIO) of a central processing unit (CPU), and duty cycles and periods of the control signals are determined by programs and counters inside the CPU.
The second one, as shown in FIG. 2, is that an LPG controller for providing control signals of LEDs is built into a CPU, in which there are some adjustable parameters such as ON/OFF, frequency, duty cycle, etc., and durations and periods of the control signals are determined by counters in an integrated circuit (IC). Typically, two LPG controllers are alternately activated to generate two alternating control signals for driving two LEDs. However, the method for driving two LEDs has two disadvantages: (1) one more LPG controller is required and thus increases circuit complexity; and (2) time intervals between the two alternating control signals are determined by respective activation timing of the LPG controllers and thus cannot be controlled precisely.